
local slot = require[[slot]]

local a = slot.new(function(l) print(l) l(0) end)
local b = slot.new()

-- feedback detect test
a:listen(function(x) print(x) end, 4)
b:listen(function(x) print(x) end)
a(function(x) b:put(x) end)
b(function(x) a:put(x) end)

print('------------------------------')
a:put_if(function(m) return m == 4 end, 42)
print('------------------------------')
a:put(42)

